<%@ page pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="itsm.isperp.framework.core.context.ContextHolder"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<jsp:include page="../common/top.jsp"></jsp:include>
<style type="text/css">
.page-footer {
	margin-top: 20px; padding-bottom: 50px; height: 38px; line-height: 38px; border-top: 2px solid #CCCCCC; color: #737573; text-align: right; font-size: 10pt;
}
</style>

<div class="nui-info">

	<div id="knowledgeTitle" class="title">${model.title}</div>

	<div class="categoryInfo">
		发布日期：
		<fmt:formatDate value="${model.publish_date}" pattern="yyyy-MM-dd" />
		&nbsp;&nbsp;提交人：${model.creator_name}&nbsp;&nbsp;
		浏览数(${model.read_times})&nbsp;&nbsp;评论数(${commentCount })&nbsp;&nbsp;
	</div>
	<div class="readInfo">
		知识分类：${model.treenode_name_path}&nbsp;&nbsp;关键词：${model.keyword} </a>
	</div>
	<div class="contents">${model.contents}</div>

	<h3 style="font-size:14px;font-weight: bold;">相关附件:</h3>

	<div>
		<c:forEach items="${uploadFiles }" var="file">
			<a target="_blank" href="${file.path }">${file.name }</a>(大小：${file.size/1000 }KB)
		</c:forEach>
	</div>

	<div class="code_comments code_module">
		<h2>
			<span class="right"> </span> <a name="comments">最新评论<strong>(${commentCount
					})</strong> </a>
		</h2>
	</div>
	<div class="comments">
		<ul>
			<c:forEach items="${comments}" var="commentary" varStatus="status">
				<li class="row_${(status.index)%2 }">
					<table>
						<tr>
							<td class="portrait"><c:choose>
									<c:when test="${empty commentary.photo }">
										<img src="img/elements/profile/avatar.png">
									</c:when>
									<c:otherwise>
										<img src="${commentary.photo}">
									</c:otherwise>
								</c:choose>
							</td>
							<td class="body">
								<div class="r_title">
									<b>${commentary.commenter_name}</b> 发表于
									<fmt:formatDate value="${commentary.comment_time}"
										pattern="yyyy-MM-dd HH:mm" />

									<div class="r_content TextContent">
										${commentary.content} <br>
									</div>
								</div>
						</tr>
					</table>
				</li>
			</c:forEach>

		</ul>

	</div>


</div>

<jsp:include page="../common/bottom.jsp"></jsp:include>